<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>新美DSP系统</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="/static/backend/plugins/layui/css/layui.css">
    <link rel="stylesheet" href="/static/backend/css/passport.css">
    <script src="/static/backend/js/jquery/2.0.1/jquery.min.js"></script>
    <script src="/static/backend/plugins/layui/layui.js"></script>
</head>
<body>
<div class="main-page">
    <div class="passport-model">
        <div class="passport-content">

            <div class="system-box">
                <h3>新美控股 |广告联盟</h3>
            </div>

            <form class="layui-form" onsubmit="return false">
                <div class="layui-form-item submit-box">
                    <div class="layui-input-block">
                        <a href="/passport/login" class="layui-btn" lay-submit="" lay-filter="submit">我要 投放广告</a>
                    </div>
                </div>

                <div class="layui-form-item submit-box">
                    <div class="layui-input-block">
                        <a href="/passport/login" class="layui-btn" lay-submit="" lay-filter="submit">我要流量变现</a>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
</body>
<script>
    // 加载FORM表单扩展
    layui.use(['form'], function(){
        var form = layui.form()
            ,layer = layui.layer;
        form.on('submit(submit)', function(data){
            $.ajax({
                url: "doLogin",
                type: "post",
                data:data.field ,
                dataType: "json",
                success: function (response) {
                    if (response.status == "success") {
                        window.location.href = response.jump;
                    } else {
                        layer.msg(response.msg, {icon: 5, shift: 6}, function(){});
                    }
                }
            });
        });

    });
</script>
</html>
